# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-term-table
pkgver=0.016
pkgrel=3
pkgdesc="Format a header and rows into a table"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/release/Term-Table"
depends=('perl-importer')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Term-Table-$pkgver.tar.gz")
sha512sums=('b35700fba336f57e479d818ef74fc746979b3acb081a7cde816b39c5fb65bedd5217257426ba22bdcaf8d73292cd98efd23295144a996f7bd117ada775cdfe5b')

build() {
  cd Term-Table-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Term-Table-$pkgver
  make test || echo "Expected failure due to Test2::Tools::Tiny being too old"
}

package() {
  cd Term-Table-$pkgver
  make DESTDIR="$pkgdir" install
}
